
var wsServer = 'wss://wechat.shangning.site:9502';
var ws = new WebSocket(wsServer);
ws.onopen = function(evt){
    
}

ws.onmessage = function(evt){

}

ws.error = function(evt){
    console.log('错误信息');
}

ws.close = function(evt){
    console.log('链接关闭');
}